<?php 
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version 	$Id: show.phtml 5174 2010-08-30 10:57:01Z huuphuoc $
 * @since		2.0.0
 */
?>
<div class="t_news_hotest">
	<?php if ($this->articles && count($this->articles) > 0) : ?>
	<div class="image">
		<?php if ($this->articles[0]->image_medium != null) : ?>
		<a href="<?php echo $this->url($this->articles[0]->getProperties(), 'news_article_details'); ?>">
			<img src="<?php echo $this->articles[0]->image_medium; ?>" />
		</a>
		<?php endif; ?>
	</div>
		
	<h2><a href="<?php echo $this->url($this->articles[0]->getProperties(), 'news_article_details'); ?>"><?php echo $this->articles[0]->title; ?></a></h2>
	<cite><?php echo $this->dateFormatter()->diff(strtotime($this->articles[0]->created_date), $this->dateFormat); ?></cite>
	<div><?php echo $this->articles[0]->description; ?></div>
	
	<ul>
		<?php for ($i = 1; $i < count($this->articles); $i++) : ?>
		<li><h3><a href="<?php echo $this->url($this->articles[$i]->getProperties(), 'news_article_details'); ?>"><?php echo $this->articles[$i]->title; ?></a></h3></li>
		<?php endfor; ?>
	</ul>
	<?php endif; ?>
</div>
